package practicedemo60;

public class Test {
    public static void main(String[] args) {
        OverseaStudent student = new OverseaStudent();
        student.lunch();
    }

}
class Person {
    public void lunch(){
        this.eat();
        this.drink();
    }
    public void eat(){
        System.out.println("吃米饭和菜");
    }
    public void drink(){
        System.out.println("喝茶");
    }
}

class OverseaStudent extends Person{
    //方法重写：当父类的方法已经满足不了子类了
    @Override
    public void lunch(){
        this.eat();
        this.drink();

        super.eat();
        super.drink();
    }

    @Override
    public void eat(){
        System.out.println("吃牛排");
    }
    @Override
    public void drink(){
        System.out.println("喝可乐");
    }
}
